
#include <iostream>
//#include "GeeJoan/.pb.h"
#include "SecurityCommon.h"
#include "Common.h"
using namespace GeeJoan::Common;
int main()
{
    std::cout <<" AES Test Start "<<std::endl;
    std::string testdata = "test1";
    std::string test_Aes_key = "01234567890123456789012345678901";
    std::string  test_Aes_vi = "0123456789012345";
    std::string test_Aes_output_data ;
    common_encrypt( test_Aes_output_data , GeeJoan::Common::CIPHER_AES_CTR_NOPADDING , (const uint8_t*)test_Aes_key.c_str() , test_Aes_key.size() , (const uint8_t*)test_Aes_vi.c_str() , test_Aes_vi.size() , (const uint8_t*) testdata.c_str() , testdata.size() , nullptr);

    std::cout << "   Aes_out : " << StringToHex(test_Aes_output_data) << std::endl;
    std::string test_Aes_deCode_data ;
    common_decrypt( test_Aes_deCode_data , CIPHER_AES_CTR_NOPADDING , (const uint8_t*)test_Aes_key.c_str() , test_Aes_key.size() , (const uint8_t*)test_Aes_vi.c_str() , test_Aes_vi.size() , (const uint8_t*) test_Aes_output_data.c_str() , test_Aes_output_data.size() , nullptr);

    std::cout << "Aes deCode : " << test_Aes_deCode_data << std::endl;
    std::cout <<" AES Test end "<<std::endl;

    return 0;
}